/**
 * \file
 *
 * \brief Empty user application template
 *
 */

/*
 * Include header files for all drivers that have been imported from
 * Atmel Software Framework (ASF).
 */
#include <asf.h>

int main (void)
{
	board_init();
	sysclk_init();
	
	
	// USART options.
	static usart_rs232_options_t USART_SERIAL_OPTIONS = {
		.baudrate = USART_SERIAL_WCU_BAUDRATE,
		.charlength = USART_SERIAL_CHAR_LENGTH,
		.paritytype = USART_SERIAL_PARITY,
		.stopbits = USART_SERIAL_STOP_BIT
	};

	// Initialize WCU USART driver in RS232 mode
	usart_init_rs232(USART_SERIAL_WCU, &USART_SERIAL_OPTIONS);
	
	USART_SERIAL_OPTIONS.baudrate = USART_SERIAL_CONSOLE_BAUDRATE;

	// Initialize Serial Interface using Stdio Library
	stdio_serial_init(USART_SERIAL_CONSOLE, &USART_SERIAL_OPTIONS);

	// Specify that stdout should not be buffered.
	#if (defined(__GNUC__) && defined(__AVR32__))
	setbuf(stdout, NULL);
	#else // __ICCAVR32__
	// Already the case in IAR's Normal DLIB default configuration: printf()
	// emits one character at a time.
	#endif

	// Specify that stdin should not be buffered.
	#if (defined(__GNUC__) && defined(__AVR32__))
	setbuf(stdin, NULL);
	#else // __ICCAVR32__
	// Already the case in IAR's Normal DLIB default configuration
	#endif

	// Insert application code here, after the board has been initialized.
	
	
	printf("");
	
	
	
}
